
% -----------------------------------------------------------
How to run MINE in Java

First, make sure Java is installed. Then download MINE.jar, open a command prompt, and type

java -jar MINE.jar

followed by the necessary command-line parameters.

How to run MINE in R
First, make sure both R and Java are installed. Next, download and save both MINE.jar and MINE.r into the same directory and make that directory the working directory in R. The example below then runs MINE on all the variable pairs in the file example.csv.

install.packages("rJava") # 1-time initialization step
source("MINE.R")
MINE("example.csv","all.pairs")

The library exposes two functions: MINE, and rMINE. The difference between them is that MINE takes as input a path to a csv file to be analyzed, while rMINE takes as input an R matrix containing the data to be analyzed. Both functions take parameters identical to those in the Java version. For additional information, see the comments in MINE.r.

% ----------------------------------------------------------
% NOTICE:
If your matlab can not run JAVA code, please install the JAVA before using MINE ('jre-7u45-windows-x64.exe': JAVA Chinese version, 64 bit Win 7).

% more details about MINE please see: 

http://www.exploredata.net/Downloads/MINE-Application

% ----------------------------------------------------------


MINEs parameters
The following is a non-comprehensive list of MINEs input parameters and their default values. The complete list is available as a pdf.

To determine which variables MINE compares to each other, one of the following flags is required immediately following the name of the input file: -allPairs compares all pairs of variables against each other, -adjacentPairs compares consecutive pairs of variables only; -masterVariable i or just a number i compares all variables only against the i-th variable; -onePair i j or just the pair i j compares only the i-th variable against the j-th variable; -pairsBetween i will compare each of the first i variables against each of the rest of the variables. Variables are indexed from 0. 

cv : A floating point number indicating which percentage of the records need to have data in them for both variables before those two variables are compared. This parameter is optional, and its default value is 0. 

exp : The exponent that determines how many cells are allowed in the grids considered by the algorithm. This parameter controls the value of  in the equation B(n) = n. It is optional, and its default value is 0.6. 

c: Determines by what factor clumps may outnumber columns when OptimizeXAxis is called. When trying to partition the x-axis into x columns, the algorithm will start with at most cx clumps. This number can be made smaller to increase speed, and it can be made larger to make the approximation of the characteristic matrix closer to optimal. This parameter is optional, and its default value is 15. 

Example
java -jar MINE.jar Spellman.csv 0 cv=0.7
will run the Java version of MINE on the file 'Spellman.csv'. The only variable pairs that will be analyzed are the first variable against the rest of the variables. A variable pair will be ignored if fewer than 70% of the records have values for both the variables in question. Try executing this line after dowloading the gene expression data set available on our site and saving it with the name 'Spellman.csv' into the same folder as MINE.jar.
